<?php

namespace app\admin\model\scanwork;

use think\Model;

class Warehouse extends Model
{
    protected $name = 'scanwork_warehouse';
    protected $autoWriteTimestamp = 'int';
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';

    public function locations()
    {
        return $this->hasMany('Location', 'warehouse_id', 'id');
    }

    public function stocks()
    {
        return $this->hasMany('Stock', 'warehouse_id', 'id');
    }
}
